<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\grid\GridView;
use dosamigos\datetimepicker\DateTimePicker;//时间
use common\models\Activity\Activity;
use common\models\Guest\Guest;
use common\models\Guest\GuestSearch;
use common\models\Label\Label;
use common\models\Label\LabelSearch;
use common\models\customset\CustomSet;
use common\models\customset\CustomSetSearch;
use yii\helpers\ArrayHelper;
use \kucha\ueditor\UEditor;
/* @var $this yii\web\View */
/* @var $model common\models\Activity\Activity */
/* @var $form yii\widgets\ActiveForm */

$jiabin = ArrayHelper::map(Guest::find()->all(), 'g_id', 'g_name');
$biaoqian = ArrayHelper::map(Label::find()->all(), 'la_id', 'la_name');
$leixing= ArrayHelper::map(CustomSet::find()->all(), 'set_id', 'title');
?>

<div class="activity-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'ac_name')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'la_id')->dropdownlist($biaoqian)  ?>

    <?= $form->field($model, 'ac_desciption')->widget('kucha\ueditor\UEditor',[]) ?>

    <div>
        <div class="form-group field-classteam-starttime required" style="width: 300px">
            <label class="control-label" for="classteam-starttime">开始时间</label>
            <?= DateTimePicker::widget([
                'model' => $model,
                'attribute' => 'start_time',
                'language' => 'zh-CN',
                'size' => 'ms',
                'clientOptions' => [
                    'autoclose' => true,
                    'linkFormat' => 'yyyy-mm-dd  HH:ii ',
                    'todayBtn' => true
                ]
            ]);?>
        </div>
    </div>
    <div>
        <div class="form-group field-classteam-starttime required" style="width: 300px">
            <label class="control-label" for="classteam-starttime">结束时间</label>
            <?= DateTimePicker::widget([
                'model' => $model,
                'attribute' => 'end_time',
                'language' => 'zh-CN',
                'size' => 'ms',
                'clientOptions' => [
                    'autoclose' => true,
                    'linkFormat' => 'yyyy-mm-dd  HH:ii ',
                    'todayBtn' => true
                ]
            ]);?>
        </div>
    </div>

    <?= $form->field($model, 'ac_man')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'g_id')->dropdownlist($jiabin) ?>
	
	<?= $form->field($model, 'cu_id')->dropdownlist($leixing) ?>

    <?= $form->field($model, 'ac_baoming')->widget('kucha\ueditor\UEditor',[]) ?>

    <?= $form->field($model, 'ac_phone')->textInput(['maxlength' => true]) ?>

<!--     <?= $form->field($model, 'ac_number')->textInput(['maxlength' => true]) ?> -->
	
	<?= $form->field($model, 'ac_cost')->textInput(['maxlength' => true]) ?>
 
    <!-- <?= $form->field($model, 'ac_status')->dropDownList(Activity::getArrayStatus()) ?>
     
    <?= $form->field($model, 'ac_display')->dropDownList(Activity::getArrayGrade()) ?> -->

    <?= $form->field($model, 'ac_arrange')->widget('kucha\ueditor\UEditor',[]) ?>

    <?= $form->field($model, 'ac_field')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'ac_sponsor')->textInput(['maxlength' => true]) ?>
    
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? Yii::t('app', 'Create') : Yii::t('app', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>
    <?php ActiveForm::end(); ?>

</div>
